<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends BaseController {
    public function index(){
    	$article =M('article');
    	//发布文章数量
    	$article_count=$article->count();
		
    	//待审核文章数量
    	$article_verify_count=$article->where("article_status =1")->count();
    	
    	//注册会员人数
    	$user=M('user');
    	$user_count=$user->count();
    	
    	//最新发布的5个文章
    	
    	$article_list=$article->where("article_status =2")->order('article_id desc')->limit(5)->select();
    	
    	$this->assign('user_count', $user_count);
    	$this->assign('article_count', $article_count);
    	$this->assign('article_verify_count', $article_verify_count);
		$this->assign('article_list', $article_list);
		
		$this->display("index");
    }
}